{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import datetime"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "curr_time = datetime.datetime.now()\n",
    "datetime.datetime.strftime(curr_time,'%Y-%m-%d %H:%M:%S')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import tool"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "tool.Statistics([\n",
    "  [23, 13,42,11,13,42,76,55,4,56],\n",
    "  [2, 34,53,1,63,43,66,12,35,95],\n",
    "  [66, 96,23,13,78,62,31,3,84,3],\n",
    "  [85, 63,21,67,63,53,57,88,4,13],\n",
    "],\n",
    " [4, 2, 1, 3])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import json\n",
    "\n",
    "test_dict = {\n",
    "  \"a00042__20_8_32_0.3_64_0.3\":[\n",
    "      {\n",
    "      \"total\":155,\n",
    "      \"AccuracyNumber\":41,\n",
    "      \"AccuracyRate\":24.4,\n",
    "      \"money\":442,\n",
    "      \"min\":21,\n",
    "      \"max\":5321,\n",
    "      \"moneyTpye\":[1],\n",
    "      \"currTime\":'2022-07-06 19:06:43',\n",
    "      \"fileName\":\"a00042__20_8_32_0.3_64_0.3\",\n",
    "    }\n",
    "  ]\n",
    "}\n",
    "with open(\"./_data.json\",\"w\") as f:\n",
    "    json.dump(test_dict,f,indent=2,ensure_ascii=True)\n",
    "    print(\"加载入文件完成...\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import json\n",
    "\n",
    "with open(\"./_data.json\",'r') as load_f:\n",
    "    load_dict = json.load(load_f)\n",
    "    print(load_dict)\n",
    "    # print(load_dict['a00042__20_8_32_0.3_64_0.3'])\n",
    "    # print(load_dict[0][\"bfb\"])\n",
    "    # print(type(load_dict))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "for item in test_dict:\n",
    "  print(item)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import tool\n",
    "def tt():\n",
    "  print(\"=\")\n",
    "# tool.whileFn(tt, 5, 2)\n",
    "print(tool.sleeptime(1))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import os\n",
    "# path = os.path.split(os.path.realpath(__file__))[0]\n",
    "# print(path)\n",
    "os.listdir(\"C:\\weijun.wu\\learning_code\\Python\\深度学习\\Keras\\ssc\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "if type(23) == int:\n",
    "  print(\"整数 类型\")\n",
    "if type(23.32) == float:\n",
    "  print(\"浮点 类型\")\n",
    "if type(True) == bool:\n",
    "  print(\"布尔 类型\")\n",
    "if type(\"my name is Hahaha\") == str:\n",
    "  print(\"字符串 类型\")\n",
    "if type([23, \"hava a nice day\"]) == list:\n",
    "  print(\"列表 类型\")\n",
    "if type((\"nice\", 100)) == tuple:\n",
    "  print(\"元组 类型\")\n",
    "if type({\"age\":18}) == dict:\n",
    "  print(\"字典 类型\")\n",
    "if type(['r', 'b', 'u', 'n']) == set: # 这个有点难弄出来\n",
    "  print(\"集合 类型\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "576\n"
     ]
    }
   ],
   "source": [
    "EPOCHS_=[20,60]\n",
    "BATCH_SIZE_=[8, 16, 32, 64]\n",
    "MAX_STEPS_=[8, 16, 32, 64]\n",
    "DROPOUT_RATE_=[0.3, 0.6]\n",
    "LSTM_UNITS_=[16, 32, 64]\n",
    "REGULARIZERS_=[0.3, 0.1, 0.01]\n",
    "trainList = []\n",
    "\n",
    "for e in EPOCHS_:\n",
    "  for b in BATCH_SIZE_:\n",
    "    for m in MAX_STEPS_:\n",
    "      for d in DROPOUT_RATE_:\n",
    "        for l in LSTM_UNITS_:\n",
    "          for r in REGULARIZERS_:\n",
    "            trainList.append([e, b, m, d, l, r])\n",
    "print(len(trainList))"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3.9.13 64-bit",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.13"
  },
  "orig_nbformat": 4,
  "vscode": {
   "interpreter": {
    "hash": "239cd0f6924d34dc9a29cd51ff042db2679e9319f05891fd61214d5969f7bbf8"
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
